import json

def get_favorite_number():
	file_name = "number.json"
	try:
		with open(file_name) as file:
			number = json.load(file)
	except FileNotFoundError:
		number = None

	return number

def get_new_favorite_number():
	number = input("输入您喜欢的数字： ")
	file_name = "number.json"
	with open(file_name, 'w') as file:
		json.dump(number, file)

	return number

number = get_favorite_number()
if number:
	print(f"I know your favorite number! It's {number}")
else:
	number = get_new_favorite_number()
	print(f"I have stored your favorite number, It's {number}")